<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class GoodsSku
 * 
 * @property int $id
 * @property int|null $category_id
 * @property string|null $sku_name
 * @property string|null $sku_value
 * @property Carbon|null $create_at
 * @property Carbon|null $update_at
 * @property Carbon|null $delete_at
 *
 * @package App\Models
 */
class GoodsSku extends BaseModels
{
	protected $table = 'zh_goods_sku';


	protected $dates = [
		'create_at',
		'update_at',
		'delete_at'
	];

	protected $fillable = [
		'category_id',
		'sku_name',
        'sku_value',
		'create_at',
		'update_at',
		'delete_at'
	];


    public function getSkuValueAttribute($v)
    {
        return json_decode($v, true);
    }
}
